package com.itheima.exerciseTest.test01_09;

import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {

        method(new InterTest7() {
            @Override
            public void show(String str) {
                System.out.println(str);
            }
        });

        method(str -> System.out.println(str));
    }

    public static void method(InterTest7 interTest7){
        System.out.println("请输入：");
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        interTest7.show(str);
    }
}

interface InterTest7 {
    void show(String str);
}
